The present invention relates to bottle inspection systems and in particular to an inspection system and method for detecting thread defects in bottles.
Conventional bottle processing equipment moves bottles at high speed along a production line. It is important to inspect the bottles to detect bottles having defects. These defects include, but are not limited to, cracks or chips within the thread area around the neck of the bottle. When necessary, bottles with defects are rejected, i.e., removed from the production line. Because of the speed at which the production lines operate, very fist defect detection is required. Computerized video image analysis well suited for this purpose due to its non-contact nature, high speed, decision-making capability, and ability to analyze a large bottle area with each video image.
Inspection systems to detect thread defects in bottles moving along a production line have been developed. For example, U.S. Pat. No. 3,848,742 to Krenmayr discloses a system for detecting various types of defects inside the glass at the bottle neck. During operation of this system, the bottle is rotated in-place 360 degrees about its central vertical axis and must be accurately positioned in the inspection area. These requirements slow the inspection speed of the system allowing the system to inspect only a small number of bottles per minute (for example, 200 90-gram bottles per minute).
U.S. Pat. No. 4,701,612 to Strugil and U.S. Pat. No. 4,958,223 to Juvinall, both of which have the same assignee, disclose inspection Systems which require glass or plastic containers to be held in vertical orientations and rotated 360 degrees about their central axes. Furthermore, the systems require gray-level pattern matching, that is, the gray-level image of the area of the bottle under inspection must be compared with a standard image indicative of an acceptable container. To implement pattern matching of this nature, pre-processing is required to achieve standard orientation before the pattern matching process can be carried out. All these requirements result in an overall low inspection rate deficiency.
U.S. Pat. No. 5,126,556 to Domenico et al. discloses three methods for inspecting bottles to detect thread defects. The first two methods are based on precise positioning of a bottle in the inspection area. Specifically, the central vertical axis of a bottle must coincide with the optical axis of the imaging system. The third method, however, requires a bottle to be rotated 90 degrees about its central vertical axis while the bottle is moving along a conveyor. In all three methods, defect detection is based on gray-level pattern matching. As mentioned above, initial preprocessing is required before pattern matching can be implemented.
U.S. Pat. No. 5,444,535 to Axelrod discloses a high signal-to-noise optical apparatus and method for glass bottle thread damage detection. The apparatus includes a source for directing light against a s target surface. The source is selected to emit light at wavelengths substantially overlapping a target glass absorption bandwidth A first optical polarizer polarizes light emitted from the light source prior to the light impinging on the target glass surface . A light detector in the form of a photodetector and a second optical polarizer arranged in cross-polarized relation to the first optical polarizer are aligned in a scattered light beam detecting relation relative to the incident beam on the glass target surface. The light detector is at an angle in the Brewster range and generates a detected signal in response to light scattered through defects in the target glass surface.
Although the above references disclose inspection systems for detecting thread defects in bottles, improved systems to detect thread defects in bottles more quickly and accurately are continually being sought.
It is therefore an object of the present invention to provide a novel method and system for inspecting bottles to detect thread defects.
According to one aspect of the present invention there is provided a method of inspecting a bottle having a threaded section for thread defects as said bottle moves along a production line comprising the steps of:
(i) capturing a video image of said bottle with a video camera as said bottle moves into the field of view of said video camera without requiring said bottle to be at a specific position within said field of view, said video image encompassing a general region of interest containing at least a portion of the threaded section of said bottle;
(ii) determining the position of said bottle within said general region of interest based on the location of a feature of said bottle within said general region of interest;
(iii) segmenting a portion of said general region of interest which encompasses said at least a portion of said threaded section into a plurality of specific regions of interest; and
(iv) examining pixels of said video image in said specific regions of interest to detect thread defects.
In the preferred embodiment, the feature of the bottle determined at step (ii) is the top rim of the bottle. Once the top rim of the bottle is established, a reference location based on the position of the bottle is then determined. The portion of the general region of interest and the positions of the specific regions of interest are then determined based on the position of the reference location.
In one embodiment, the reference location is positioned at the center of the top rim and a central specific region of interest is determined relative to the reference location. The positions of the other specific regions of interest on opposite sides of the central specific region of interest are then determined relative to the position of the central specific region of interest. Preferably, the other specific regions of interest are increasingly offset in a Y-direction the further they are from the central specific region of interest to follow the threaded section of the bottle in the video image. It is also preferred that the other specific regions of interest decrease in width (i.e. in an X-direction) the further they are from the central specific region of interest to compensate for perspective effects.
In a preferred embodiment, during step (iv), a black/white pixel threshold value is determined for the specific regions of interest. The pixels of the video image within the specific regions of interest are compared with the pixel threshold value and the pixels are binarized as white or black depending on the results of the comparisons. Groups of contiguous white pixels larger than a threshold number are filtered and if the shapes of the groups of contiguous white pixels do not resemble bottle threads, the groups of contiguous white pixels are determined to be thread defects.
According to another aspect of the present invention there is provided a system for inspecting bottles having a threaded section as said bottles are moved along a production line comprising:
a plurality of video imaging sections disposed along said production line at spaced locations, each video imaging section being oriented with respect to said production line to take a video image of each bottle at a different circumferential region thereof as each bottle moves into the field of view of said video imaging section without requiring said bottle to be at a specific location in said field of view, said video images encompassing a general region of interest containing at least a portion of the threaded section of each bottle; and
processing means in communication with said video imaging sections and receiving the video images taken thereby, said processing means processing each video image to determine the position of said bottle within said general region of interest based on the location of a feature of said bottle within said general region of interest; segmenting a portion of said general region of interest which encompasses said at least a portion of said threaded section into a plurality of specific regions of interest; and examining pixels in said specific regions of interest to detect thread defects.
In a preferred embodiment, each video imaging section includes a video camera and a light source. The light source and the video camera are positioned on opposite sides of the production line and are oriented so that video images of the entire circumference of each bottle are taken. in one embodiment the processing means signs a bottle reject mechanism downstream of the inspection system when a defective bottle is detected so that the defective bottle can be removed from the production line.
According to yet another aspect of the present invention there is provided a system for inspecting bottles having a threaded section as said bottles are moved along a production line comprising:
a plurality of video imaging sections disposed along said production line at spaced locations, each video imaging section being oriented with respect to said production fine to take a video image of each bottle at a different circumferential region thereof as each bottle moves into the field of view of said video imaging section without requiring said bottles to be at a specific location in said field of view, said video imaging sections being arranged to reduce spacing therebetween; and
processing means in communication with said video imaging sections and receiving the video images taken thereby, said processing means processing said video images to detect thread defects in said bottle.
In a preferred embodiment, each video imaging section includes a video camera and a light source. The light source and the video camera are positioned on opposite sides of the production line and are laterally offset so that the optical axes of the video imaging sections form oblique angles with respect to the direction of travel of the bottles. It is also preferred that the video imaging sections are arranged in an upstream pair and a downstream par with the optical axes of the upstream pair forming obtuse angles with respect to the direction of travel of the bottles and with the optical axes of the downstream pair forming acute angles with respect to the direction of travel of the bottles.
According to yet another aspect of the present invention there is provided a method of locating the position of a bottle within a video image comprising the steps of:
capturing a video image of at least a portion of said bottle with a video camera;
digitizing said video image;
comparing pixels in said video image with a threshold value and binarizng said pixels as white or black depending on the results of said comparisons; and
determining the position of said bottle relative to the boundaries of said video image based on the location of the largest group of contiguous white pixels within said video image.
In still yet another aspect of the present invention there is provided method of detecting defects in bottle threads comprising the steps of:
capturing a video image of said bottle threads;
segmenting at least a portion of said video image into a plurality of specific regions of interest; and
video processing each specific region of interest independently to determine defects in each of said specific regions of interest based on the existence of white areas larger than a prescribed threshold area size within said specific regions of interest.
According to still yet another aspect of the present invention there is provided a system for locating the position of a bottle within a video image comprising:
means for back lighting said bottle with a light source;
a video camera for capturing a video image of at least a portion of said bottle within the field of view thereof;
means for digitizing said video image; and
means for determining the position of said bottle within said video image based on the location of the largest white area within said video image.
According to still yet another aspect of the present invention there is provided a system for detecting defects in bottle threads comprising:
means for capturing a video image of said bottle threads;
means for segmenting at least a portion of said video image into a plurality of specific regions of interest; and
means for video processing each specific region of interest independently to determine defects in each of said specific regions of interest based on the existence of white areas larger than a prescribed threshold area size within said specific region of interest.
The present invention provides advantages in that thread defects in bottles can be detected without requiring handling of the bottles and while the bottles are moving at a high rate of speed along the production line. When a defective bottle is detected, the inspection system signals a bottle reject mechanism to allow the defective bottle to be removed from the production line without slowing movement of the bottles along the production line.